package com.meepo.feed.topic

import android.os.Bundle
import android.view.View
import com.meepo.basic.router.RouterManager.FeedModule.FeedTopicListSimple_Path
import com.meepo.basic.components.listfragment.ListFragmentParams
import com.meepo.basic.schema.user.User.Companion.SELF
import com.meepo.basic.components.view.MeepoActivity
import com.meepo.feed.R
import com.meepo.framework.design.helper.StatusBarHelper
import com.xiaojinzi.component.anno.RouterAnno
import kotlinx.android.synthetic.main.topic_list_simple_activity.*


@RouterAnno(hostAndPath = FeedTopicListSimple_Path)
class TopicListSimpleActivity : MeepoActivity() {
    override fun setUpContentLayout(): Int = R.layout.topic_list_simple_activity
    override fun initData() {
    }

    override fun initView(view: View, savedInstanceState: Bundle?) {

        back_iv.setOnClickListener { finish() }

        StatusBarHelper.immerse(this, header_ll)

        val fragment =
            TopicListFragment.instance(
                simple = true,
                joinedByUserId = SELF,
                listFragmentParams = ListFragmentParams(enablePullRefresh = false)
            )
        loadRootFragment(R.id.topic_list_frame, fragment)
    }
}